package com.edushare.common.dao;

import com.edushare.common.orm.ORMInterface;
import com.edushare.common.vo.Publications;

public class PublicationsDAO extends CayenneBasedDAO {

	public PublicationsDAO(ORMInterface ormInterface) {
		super(ormInterface);
	}

	public void addNewPublication(Publications pub) {
		getDataContext().registerNewObject(pub);
		getDataContext().commitChanges();
	}

	public void delete(Publications p) {
		getDataContext().deleteObject(p);
		getDataContext().commitChanges();
	}

}
